﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="commonuser.aspx.cs" Inherits="Sys_commonuser" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>普通用户管理</title>
       <link rel="stylesheet" type="text/css" href="../js/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../js/themes/icon.css"/>
	<link rel="stylesheet" type="text/css" href="../CSS/Style.css"/>
	<link rel="Stylesheet" href="../js/artDialog/skin/aero.css" /> 
    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>  
	<script type="text/javascript" src="../js/artDialog/artDialog.min.js"></script> 
	<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript">
	//jquery与asp.net ajax的差异导致jquery组件只能执行一次，第二次由于updatepanel局部更新重写了其范围中的搜有元素
	//致使jquery失效，因为jquery组件只在页面加载时(DOM 树生成)初始化全部组件(包括绑定事件)
//   	 $(document).ready(function() { reload();})
//     function reload() {Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);}
//	 function EndRequestHandler() { $('#txtDate').datebox(); }
	function geturl(target)
	{
	var url=$(target).attr("href");
	showdialog(url);
	return false;
	}
    function showdialog(tar)
     {
         art.dialog.open
         (tar,
             {	
                     id:"iframecheckcommon" ,
                      title:"查看详细信息",
                    skin:"aero"
             }
         );
    }
	</script>
</head>
<body>
    <form id="form1" runat="server">
   <div style="background:#efefef;width:100%;">
		<a href="adminview.aspx" target="mainwin" class="easyui-linkbutton" plain="true">学院管理员</a>&nbsp;&nbsp;|
		<a href="projectadmin.aspx" target="mainwin" class="easyui-linkbutton" plain="true">项目管理员</a>&nbsp;&nbsp;| <a href="#"  target="mainwin" class="easyui-linkbutton" plain="true">所有用户</a>
	</div>	 
    
   <div>  <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
           <div style="background-color:#fedcbd; padding-bottom:5px;">
        <table>
        <tr><td colspan='9'>
            搜索条件：</td></tr>
            <tr>
                <td>学院：
                </td>
                <td>
                    <asp:DropDownList ID="ddlCollege" runat="server" Width="160px">
                    </asp:DropDownList>
                </td>
                <td>级别：
                </td>
                <td>
                    <asp:DropDownList ID="ddlLevel" runat="server" Width="120px">
                        <asp:ListItem Value="100">全部</asp:ListItem>
                        <asp:ListItem Value="1">普通用户</asp:ListItem>
                        <asp:ListItem Value="2">学院管理员</asp:ListItem>
                        <asp:ListItem Value="3">项目管理员</asp:ListItem>
                    </asp:DropDownList></td>
                   <td>注册时间:
                </td>
                <td>
                    <input id="txtDate" onfocus="WdatePicker({startDate:'%y-%M-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true,isShowClear:true,autoPickDate:true,readOnly:true})" readonly="readOnly"  runat="server" style="width: 100px"/></td>
                <td>状态：</td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="80px">
                        <asp:ListItem Selected="True" Value="1">已审批</asp:ListItem>
                        <asp:ListItem Value="0">未审批</asp:ListItem>
                        <asp:ListItem Value="100">全部</asp:ListItem>
                    </asp:DropDownList></td>
                   <td style="width:30px;">
                       <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                           <ContentTemplate>
                       <asp:ImageButton ID="btnSearch" runat="server" EnableViewState="False" ImageUrl="~/Images/search.png" ToolTip="点击搜索！" OnClick="btnSearch_Click" EnableTheming="False" />
                           </ContentTemplate>
                       </asp:UpdatePanel>
                   </td> 
            </tr>
        </table>
    </div> 
           <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate> 
           <div>
          <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" FirstPageText="首页"
                        HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页" 
                        PageIndexBoxType="TextBox" PageSize="15" PrevPageText="上一页" ShowCustomInfoSection="Left"
                        ShowPageIndexBox="Always" Width="100%" CustomInfoHTML="共<font color=blue><b>%RecordCount%</b></font>条数据 每页：<font color=blue><b>%PageSize%</b></font> 条 共<font color=blue><b>%PageCount%</b></font>页 当前页：<font color=red><b>%CurrentPageIndex%/%PageCount%</b></font>" OnPageChanged="AspNetPager1_PageChanged" CustomInfoSectionWidth="50%" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" CustomInfoTextAlign="Left">
                    </webdiyer:AspNetPager></div> 
                   <div>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gvStyle" AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="pgr" EmptyDataText="暂时无任何数据！" Width="100%" OnRowCommand="GridView1_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="序号">   <ItemTemplate> 
                              <%# (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + Container.DataItemIndex + 1%> 
                            </ItemTemplate> 
                            <ItemStyle Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="tid" HeaderText="工号" >
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="name" HeaderText="姓名" >
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="depart" HeaderText="院系" />
                        <asp:BoundField DataField="regdatetime" HeaderText="注册时间" >
                            <ItemStyle Width="160px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="status" HeaderText="状态" >
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="usertype" HeaderText="级别" >
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href='../Popwin/personaldatails.aspx?id=<%# Eval("tid") %>' target="mainwin" onclick="return geturl(this)">
                                <img style="border:0px;" src="../js/themes/icons/search.png" alt="查看" /></a>|
                                <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/js/themes/icons/key-red.png"
                                    ToolTip="重置密码" CommandArgument='<%# Eval("tid") %>' />|
                                <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/js/themes/icons/cancel.png"
                                    ToolTip="删除此用户" OnClientClick='return confirm("删除用户将删除该用户的一切信息（包括提交的项目和邮件），您确定要删除此用户？");' CommandArgument='<%# Eval("tid") %>' CommandName="del" />
                            </ItemTemplate>
                            <ItemStyle Width="90px" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                    <AlternatingRowStyle CssClass="alt" />
                </asp:GridView>
                </div> 
            </ContentTemplate>
        </asp:UpdatePanel></div> 
    </form>
</body>
</html>
